package com.neural.activation;

public enum ActivationManager {

	INPUT_ACTIVATION("input", new InputActivation()),
	LINEAR_ACTIVATION("linear", new LinearActivation()),
	TRESHOLD_ACTIVATION("treshold", new TresholdActivation()),
	SIGMOID_ACTIVATION("sigmoid", new SigmoidActivation());
	
	private ActivationManager(String name, Activation activation) {
		this.name = name;
		this.activation = activation;
	}
	
	public static Activation getActivationFromName(String name) {
		for(ActivationManager activationManager : values()) {
			if(activationManager.name.equals(name)) {
				return activationManager.activation;
			}
		}
		return null;
	}
	
	private final String name;
	private final Activation activation;
}
